package edu.gdkm.pay;

public class Student {
    public String studentId;
    public String name;
    public int cScore;
    public int computerScore;
    public int englishScore;

    // 无参数的构造方法
    public Student() {
    }

    // 包含所有参数的构造方法
    public Student(String studentId, String name, int cScore, int computerScore, int englishScore) {
        this.studentId = studentId;
        this.name = name;
        this.cScore = cScore;
        this.computerScore = computerScore;
        this.englishScore = englishScore;
    }

    // 只包含学生基本信息的构造方法
    public Student(String studentId, String name) {
        this.studentId = studentId;
        this.name = name;
    }

    // 计算平均分的方法
    public double avg() {
        return (cScore + computerScore + englishScore) / 3.0;
    }
}